# -*- coding: cp936 -*-

# -*- coding: cp936 -*-

import pygame,math,random,time
from pygame.locals import *


pygame.init()
width,height = 500,500


screen = pygame.display.set_mode((width,height))


white = (255,255,255)


while 1:
    
    pygame.draw.rect(screen, white, (0, 0, width, height))

    font = pygame.font.Font(None,24)
    minutes = str(pygame.time.get_ticks()/60000)
    seconds = str(pygame.time.get_ticks()/1000%60).zfill(2)
    clock = font.render(minutes+':'+seconds,True,(0,0,0))
    screen.blit(clock,(450,10))
    pygame.display.flip()
#添加关闭游戏
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            exit(0)